package com.cyj.comment.controller;


import com.cyj.comment.entity.ShopType;
import com.cyj.comment.service.ShopTypeService;
import com.cyj.comment.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author chixiaowai
 * @since 2023-04-04
 */
@RestController
@RequestMapping("/shop-type")
public class ShopTypeController {
    @Autowired
    private ShopTypeService shopTypeService;

    /**
     * 查询所有商铺类型
     * @return
     */
    @GetMapping("/list")
    public Result queryTypeList(){
//        List<ShopType> typeList = shopTypeService.query().orderByAsc("sort").list();
//        return Result.ok(typeList);
        return shopTypeService.queryShopTypeList();
    }
}

